home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 002 / emacssrc.arc / EVAR.H < prev    next >
Text File  |  1987-02-02  |  3KB  |  110 lines

  1. /*    EVAR.H:    Environment and user variable definitions
  2.         for MicroEMACS
  3.  
  4.         written 1986 by Daniel Lawrence
  5. */
  6.  
  7. /*    structure to hold user variables and their definitions    */
  8.  
  9. typedef struct UVAR {
  10.     char u_name[NVSIZE + 1];        /* name of user variable */
  11.     char *u_value;                /* value (string) */
  12. } UVAR;
  13.  
  14. /*    current user variables (This structure will probably change)    */
  15.  
  16. #define    MAXVARS        100
  17.  
  18. UVAR uv[MAXVARS];    /* user variables */
  19.  
  20. /*    list of recognized environment variables    */
  21.  
  22. char *envars[] = {
  23.     "fillcol",        /* current fill column */
  24.     "pagelen",        /* number of lines used by editor */
  25.     "curcol",        /* current column pos of cursor */
  26.     "curline",        /* current line in file */
  27.     "ram",            /* ram in use by malloc */
  28.     "flicker",        /* flicker supression */
  29.     "curwidth",        /* current screen width */
  30.     "cbufname",        /* current buffer name */
  31.     "cfname",        /* current file name */
  32.     "sres",            /* current screen resolution */
  33.     "debug",        /* macro debugging */
  34.     "status",        /* returns the status of the last command */
  35.     "palette",        /* current palette string */
  36. };
  37.  
  38. #define    NEVARS    sizeof(envars) / sizeof(char *)
  39.  
  40. /*     and its preprocesor definitions        */
  41.  
  42. #define    EVFILLCOL    0
  43. #define    EVPAGELEN    1
  44. #define    EVCURCOL    2
  45. #define    EVCURLINE    3
  46. #define    EVRAM        4
  47. #define    EVFLICKER    5
  48. #define    EVCURWIDTH    6
  49. #define    EVCBUFNAME    7
  50. #define    EVCFNAME    8
  51. #define    EVSRES        9
  52. #define    EVDEBUG        10
  53. #define    EVSTATUS    11
  54. #define    EVPALETTE    12
  55.  
  56. /*    list of recognized user functions    */
  57.  
  58. typedef struct UFUNC {
  59.     char *f_name;    /* name of function */
  60.     int f_type;    /* 1 = monamic, 2 = dynamic */
  61. } UFUNC;
  62.  
  63. #define    MONAMIC        1
  64. #define    DYNAMIC        2
  65. #define    TRINAMIC    3
  66.  
  67. UFUNC funcs[] = {
  68.     "add", DYNAMIC,        /* add two numbers together */
  69.     "sub", DYNAMIC,        /* subtraction */
  70.     "tim", DYNAMIC,        /* multiplication */
  71.     "div", DYNAMIC,        /* division */
  72.     "mod", DYNAMIC,        /* mod */
  73.     "neg", MONAMIC,        /* negate */
  74.     "cat", DYNAMIC,        /* concatinate string */
  75.     "lef", DYNAMIC,        /* left string(string, len) */
  76.     "rig", DYNAMIC,        /* right string(string, pos) */
  77.     "mid", TRINAMIC,    /* mid string(string, pos, len) */
  78.     "not", MONAMIC,        /* logical not */
  79.     "equ", DYNAMIC,        /* logical equality check */
  80.     "les", DYNAMIC,        /* logical less than */
  81.     "gre", DYNAMIC,        /* logical greater than */
  82.     "seq", DYNAMIC,        /* string logical equality check */
  83.     "sle", DYNAMIC,        /* string logical less than */
  84.     "sgr", DYNAMIC,        /* string logical greater than */
  85.     "ind", MONAMIC,        /* evaluate indirect value */
  86. };
  87.  
  88. #define    NFUNCS    sizeof(funcs) / sizeof(char *)
  89.  
  90. /*     and its preprocesor definitions        */
  91.  
  92. #define    UFADD        0
  93. #define    UFSUB        1
  94. #define    UFTIMES        2
  95. #define    UFDIV        3
  96. #define    UFMOD        4
  97. #define    UFNEG        5
  98. #define    UFCAT        6
  99. #define    UFLEFT        7
  100. #define    UFRIGHT        8
  101. #define    UFMID        9
  102. #define    UFNOT        10
  103. #define    UFEQUAL        11
  104. #define    UFLESS        12
  105. #define    UFGREATER    13
  106. #define    UFSEQUAL    14
  107. #define    UFSLESS        15
  108. #define    UFSGREAT    16
  109. #define    UFIND        17
  110.